<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
<script >
    function f() {
        var xhttp= new XMLHttpRequest();


        xhttp.onreadystatechange=function(){
            if (this.readyState == 4 && this.status == 200){

               myEditor.setData(this.responseText)
               document.getElementById("文本").value=myEditor.getData()
            }
        }
      xhttp.open("post","/返回文件",true);
        xhttp.send();

    }

function f1() {

}


</script>

</head>
<body>
<textarea name="content" id="editor">

</textarea>
<script src="/HTML/ckeditor5/build/ckeditor.js"></script> <!--改成自己项目的路径-->
<script src="/HTML/ckeditor5/build/translations/zh-cn.js"></script> <!--改成自己项目的路径-->

<script>
    var myEditor = null;
    ClassicEditor
        .create( document.querySelector( '#editor' ) ,{
            fontSize: {
                options: [
                    'tiny',
                    'default',
                    'big'
                ]
            },
            language: 'zh-cn',
            toolbar: {
                items: [
                    'heading',
                    '|',
                    'alignment',                                                 // <--- ADDED
                    'bold',
                    'italic',
                    'link',
                    'bulletedList',
                    'numberedList',
                    'imageUpload',
                    'blockQuote',
                    'insertTable',
                    'mediaEmbed',
                    'undo',
                    'redo',
                    "Alignment",
                    "Highlight",
                    'fontSize'
                ]
            },

        } )
        .then(editor=>{
            myEditor=editor;
        })
        .catch( error => {
            console.error( error );
        } );
</script>

<br>

 <input type="button" value="显示"  onclick="f()">
</body>
<textarea id="文本">

</textarea>

</html>